<link href="images/skin.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #EEF2FB;
}
.error{color:red;}
-->
</style>
<script charset="utf-8" src="kindeditor-4.0.2/kindeditor.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/jquery.validate.js"></script>

<script>
$(document).ready(function(){
  	var editor;
	KindEditor.ready(function(K) {
		K('select[name=charset]').change(function() {
			if (editor) {
				editor.remove();
				editor = null;
			}
			editor = K.create('textarea[name="content"]', {
				langType : this.value
			});
		});
		K('select[name=charset]').change();
	}); 			   
	$("#domain").validate({
		rules:{
			   article_cat:"required",
			   title:"required"
			  }
		,
		messages:{
			article_cat:"Please choose category.",
			title:"Please input news title."
		},
		errorPlacement:function(error,element){
		error.appendTo(element.parent().parent().next().empty());
	   }
	});
});

</script>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" valign="top" background="images/mail_leftbg.gif"><img src="images/left-top-right.gif" width="17" height="29" /></td>
    <td valign="top" background="images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">Add News<span style="padding-left:160px;"><a href="news_list.php">News List</a></span></div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="images/mail_rightbg.gif"><img src="images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  
  <tr>
    <td valign="middle" background="images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
    <form id="domain" action="news_add.php?act=<{if $id==""}>add<{else}>edit<{/if}>" method="post">
    <input type="hidden" name="id" value="<{$id}>">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
	 <br>	
     <tr  class="nowtable">
     <td class="left_bt2" style="padding-left:10px;" colspan="2">Add Category</td>
     </tr>	
     <tr >
     <td width="32%" height="30" bgcolor="#f2f2f2" class="left_txt" style="padding-left:10px;" align="left">
     Category：
     <span style="padding-left:35px;"><select name="article_cat" style="width:160px" >
     <{if $id==""}><option value="">Please choose category!</option><{$show}>
     <{else}><{$msg}><{/if}>
     </select><font style="padding-left:5px; size:auto" color="#FF0000">*</font></span>
     </td>
     <td bgcolor="#f2f2f2" class="left_txt"></td>
     </tr>
     <tr>
     <td width="32%" height="30" bgcolor="#f2f2f2" class="left_txt" style="padding-left:10px;" align="left">
    News Title：<span style="padding-left:40px;"><input style="width:160px;" type="text" name="title" value="<{$list.title}>"></span> 
     </td>
     <td bgcolor="#f2f2f2" class="left_txt"></td>
     </tr>
     <tr>
     <td width="32%" height="30" bgcolor="#f2f2f2" class="left_txt" style="padding-left:10px;" align="left">
     Words Format：<span style="padding-left:40px;"><select name="charset">
					<option value="en" <{if $list.type=='en'}>selected<{/if}>>English</option>
					<option value="zh_CN" <{if $list.type=='cn'}>selected<{/if}>>简体中文</option>
				</select></span> 
     </td>
     <td bgcolor="#f2f2f2" class="left_txt"></td>
     </tr>
     <tr>
     <td width="32%" height="30" bgcolor="#f2f2f2" class="left_txt" style="padding-left:10px;" align="left" colspan="2">
     News Content：<span class="left_txt" style="padding-left:10px;">
     <textarea  name="content" style="width:700px;height:300px;"><{$list.content}></textarea>
     </span></td>
     </tr>
      
     

     <tr><td align="left" style="padding-left:350px; padding-top:10px"><input type="submit" name="submit" value="Submit"></td></tr>
     </table>
  </form>
    </td>
    <td background="images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="bottom" background="images/mail_leftbg.gif"><img src="images/buttom_left2.gif" width="17" height="17" /></td>
    <td background="images/buttom_bgs.gif"><img src="images/buttom_bgs.gif" width="17" height="17"></td>
    <td valign="bottom" background="images/mail_rightbg.gif"><img src="images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
</body>
